package cz.zcu.fav.rat.managed.bean;

import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import cz.zcu.fav.rat.beans.ObjectClass;
import cz.zcu.fav.rat.dataaccess.service.ObjectClassService;

@ManagedBean(name = "objectClassTableBean")
@ViewScoped
public class ObjectClassTableBean extends
		AbstractTableBean<ObjectClass, ObjectClassService>
{
	private static final long serialVersionUID = 2192021178125543292L;
	
	@Override
	protected List<ObjectClass> getData()
	{
		return getDataProvider().getAll();
	}

	@Override
	protected void performDelete(List<ObjectClass> objects)
	{
		getDataProvider().deleteCollection(objects);
	}

	@Override
	protected ObjectClassService getService()
	{
		return SpringBeanFactory.getInstance().getBean("objectClassService",
				ObjectClassService.class);
	}
}
